package com.hh.generator.common.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Date 2020-06-08 15:31
 **/
@Data
@Component
@ConfigurationProperties(prefix = "generator")
public class GeneratorProperties {

    private String basePackage;
    private String module;
    private ClassConfig classConfig;
    private MethodConfig methodConfig;
    private Boolean appendMethod;
    private Map<String, String> codePathMap;


    @Data
    public static class MethodConfig {
        private Boolean append;
        private String model;
        private String action;
        private String returnType;
        private String controller;
        private String facade;
        private String service;
    }

    @Data
    public static class ClassConfig {
        private String schema;
        private List<String> tables;
        private String tablePrefix;
        private String springApplicationName;
        private String facadeBasePath;
        private String controllerBasePath;
        private Boolean generateToProject;
        private List<String> generateList;
        private List<String> methods;
    }

}
